home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / NextDeveloper / Headers / indexing / IXFileRecord.h < prev    next >
Text File  |  1994-04-13  |  3KB  |  92 lines

  1. /*
  2. IXFileRecord.h
  3. Copyright 1991, NeXT Computer, Inc.
  4. */
  5.  
  6. #import    <bsd/sys/stat.h>
  7. #import    <objc/hashtable.h>
  8. #import    <objc/Object.h>
  9. #import    <remote/transport.h>
  10.  
  11. #import    "protocols.h"
  12.  
  13. @class IXFileFinder;
  14.  
  15. // These are atoms for the standard file attributes.
  16.  
  17. extern NXAtom    IXFileNameAttribute;
  18. extern NXAtom    IXBaseNameAttribute;
  19. extern NXAtom    IXFileTypeAttribute;
  20. extern NXAtom    IXFileDeviceAttribute;
  21. extern NXAtom    IXFileInodeAttribute;
  22. extern NXAtom    IXFileModeAttribute;
  23. extern NXAtom    IXFileLinksAttribute;
  24. extern NXAtom    IXFileOwnerAttribute;
  25. extern NXAtom    IXFileGroupAttribute;
  26. extern NXAtom    IXFileSizeAttribute;
  27. extern NXAtom    IXAccessTimeAttribute;
  28. extern NXAtom    IXModifyTimeAttribute;
  29. extern NXAtom    IXChangeTimeAttribute;
  30. extern NXAtom    IXUnixTypeAttribute;
  31.  
  32.  
  33. typedef enum IXUnixType    {
  34.     IXUnixFile, IXUnixDirectory, 
  35.     IXUnixBlock, IXUnixCharacter, IXUnixLink, IXUnixSocket
  36. } IXUnixType;
  37.  
  38. @interface IXFileRecord: Object <NXTransport, IXAttributeBinding>
  39. {
  40.     id            _bindings;
  41. @public
  42.     unsigned        filedate;
  43.     IXFileFinder    *fileFinder;
  44.     char        *filename;
  45.     char        *filetype;
  46.     char        *description;
  47.     struct stat        *statBuffer;
  48. }
  49.  
  50. - (IXFileFinder *)fileFinder;
  51. - initWithFileFinder:(IXFileFinder *)aFinder;
  52. - setFileFinder:(IXFileFinder *)aFinder;
  53.  
  54. - (const struct stat *)statBuffer; // stats file if necessary
  55.  
  56. - (IXUnixType)unixType; // returns the unix type of the file
  57.  
  58. - (ino_t)fileInode; // returns the inode number
  59. - (dev_t)fileDevice; // returns the device number
  60.  
  61. - (unsigned short)fileMode; // returns the file mode
  62. - (short)fileLinks; // returns the number of links to the file
  63.  
  64. - (gid_t)fileGroup; // returns the file's group id
  65. - (uid_t)fileOwner; // returns the file's owner id
  66.  
  67. - (off_t)fileSize; // returns the file size in bytes
  68.  
  69. - (time_t)accessTime; // returns the time of the last access
  70. - (time_t)changeTime; // returns the time of the last change
  71. - (time_t)modifyTime; // returns the time of the last update
  72.  
  73. - (BOOL)hasBindings; // returns TRUE if the receiver has bindings
  74. - (IXAttributeBinder *)attributeBinder; // returns the receiver's binder
  75. - freeBindings; // frees the receiver's attribute bindings
  76.  
  77. - (const char *)filename; // returns the recorded file name
  78. - setFilename:(const char *)name; // sets the recorded file name
  79. - (const char *)basename; // returns the recorded base name
  80.  
  81. - (const char *)filetype; // returns the recorded file type 
  82. - setFiletype:(const char *)type; // sets the recorded file type
  83.  
  84. - (const char *)description; // returns the recorded description 
  85. - setDescription:(const char *)aDescription; // sets the recorded description
  86.  
  87. - (unsigned)filedate; // returns the recorded modification date
  88. - setFiledate:(unsigned)date; // sets the recorded modification date
  89.  
  90. @end
  91.  
  92.